import { getMenuList } from '@/utils/api'
export default {
    namespaced: true,
    state: {
        menuList: []
    },
    mutations: {
        menuListInit(state, payload) {
            state.menuList = payload
        }
    },
    actions: {
        async getMenuListAction({ commit }) {
            const { data } = await getMenuList({ istree: 1 })
            if (data.code === 200) {
                commit('menuListInit', data.data)
            }
        }
    }
}